package Java7_Concurrency_Cookbook.concurrent_collection_framework.thread_local_random;

/**
 * 多线程环境中使用ThreadLocalRandom拥有更好的性能
 * @author lixiangke
 * @date 2017/11/24
 */
public class Main {
    public static void main(String[] args) {
        Thread[] threads = new Thread[3];
        for (int i = 0; i < 3; i++) {
            TaskLocalRandom task = new TaskLocalRandom();
            threads[i] = new Thread(task);
            threads[i].start();
        }
    }
}
